<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
//    for of 遍历数组
const arr =[122,156,276,998]
for(const d of arr){
    // 内部可以设置判断条件
    if(d>200){
        break
    }
    console.log(d)
}



//    for of 遍历Set对象
const s = new Set([22,66])
for(const item of s ){
    console.log(item)
}
//    for of 遍历Map对象   
const map = new Map()
map.set("a",1)
map.set("b",2)
for(const e of map ){
    console.log(e)
}

const m = new Map()
m.set("a",1)
m.set("b",2)
for(const [k,v] of m ){
    console.log(k,v)
}



    </script>
</body>
</html>